<template>
  <div class="home">
    <button @click="changeName">修改name</button>
    <h2>name{{ $store.state.name }}</h2>
  </div>
</template>

<script>
export default {
  methods: {
    changeName() {
      this.$store.commit({
        type:'changeName',
        counter:1000
      })
    },
  },
}
</script>

<script setup></script>

<style scoped></style>
